package tw.asap.plus.entity.response;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.List;

/**
 * Description:
 * Created:      [15/11/9]
 * Author:       [Yang]
 **/
public class ShopIndex implements Parcelable {


    /**
     * img : 图片地址
     * url : 跳转地址
     */

    private List<BannerListEntity> banner_list;
    /**
     * img : 图片地址
     * url : 跳转地址
     */

    private List<ShortcutListEntity> shortcut_list;
    /**
     * sccode : 店铺分类编码
     * scname : 分类名称
     * img : 图片地址
     */

    private List<ClassListEntity> class_list;
    /**
     * logo : 店铺logo
     * operation : 店铺营业状态，0、1-营业，2-休息中，3－已闭店
     * opening : 开始营业时间
     * closing : 结束营业时间
     * distance : 距离
     * score : 评分
     * sale_nums : 销售数量
     * name : 店铺名称
     * subname : 店铺子名称
     * contact : 联系方式
     * shipping_base : 配送基价
     * shipping_price : 配送费用
     * shipping_times : 配送时间
     * is_star : 是否收藏
     * promotion : 促销信息
     */

    private List<ShopEntity> nearlist;
    /**
     * logo : 店铺logo
     * operation : 店铺营业状态，0、1-营业，2-休息中，3－已闭店
     * opening : 开始营业时间
     * closing : 结束营业时间
     * distance : 距离
     * score : 评分
     * sale_nums : 销售数量
     * name : 店铺名称
     * subname : 店铺子名称
     * contact : 联系方式
     * shipping_base : 配送基价
     * shipping_price : 配送费用
     * shipping_times : 配送时间
     * is_star : 是否收藏
     * promotion : 促销信息
     */

    private List<ShopEntity> toplist;
    /**
     * logo : 店铺logo
     * operation : 店铺营业状态，0、1-营业，2-休息中，3－已闭店
     * opening : 开始营业时间
     * closing : 结束营业时间
     * distance : 距离
     * score : 评分
     * sale_nums : 销售数量
     * name : 店铺名称
     * subname : 店铺子名称
     * contact : 联系方式
     * shipping_base : 配送基价
     * shipping_price : 配送费用
     * shipping_times : 配送时间
     * is_star : 是否收藏
     * promotion : 促销信息
     */

    private List<ShopEntity> lastlist;

    public void setBanner_list(List<BannerListEntity> banner_list) {
        this.banner_list = banner_list;
    }

    public void setShortcut_list(List<ShortcutListEntity> shortcut_list) {
        this.shortcut_list = shortcut_list;
    }

    public void setClass_list(List<ClassListEntity> class_list) {
        this.class_list = class_list;
    }

    public void setNearlist(List<ShopEntity> nearlist) {
        this.nearlist = nearlist;
    }

    public void setToplist(List<ShopEntity> toplist) {
        this.toplist = toplist;
    }

    public void setLastlist(List<ShopEntity> lastlist) {
        this.lastlist = lastlist;
    }

    public List<BannerListEntity> getBanner_list() {
        return banner_list;
    }

    public List<ShortcutListEntity> getShortcut_list() {
        return shortcut_list;
    }

    public List<ClassListEntity> getClass_list() {
        return class_list;
    }

    public List<ShopEntity> getNearlist() {
        return nearlist;
    }

    public List<ShopEntity> getToplist() {
        return toplist;
    }

    public List<ShopEntity> getLastlist() {
        return lastlist;
    }

    public static class BannerListEntity implements Parcelable {

        private String img;
        private String url;

        public void setImg(String img) {
            this.img = img;
        }

        public void setUrl(String url) {
            this.url = url;
        }

        public String getImg() {
            return img;
        }

        public String getUrl() {
            return url;
        }

        @Override
        public int describeContents() {
            return 0;
        }

        @Override
        public void writeToParcel(Parcel dest, int flags) {
            dest.writeString(this.img);
            dest.writeString(this.url);
        }

        public BannerListEntity() {
        }

        protected BannerListEntity(Parcel in) {
            this.img = in.readString();
            this.url = in.readString();
        }

        public static final Parcelable.Creator<BannerListEntity> CREATOR = new Parcelable.Creator<BannerListEntity>() {
            public BannerListEntity createFromParcel(Parcel source) {
                return new BannerListEntity(source);
            }

            public BannerListEntity[] newArray(int size) {
                return new BannerListEntity[size];
            }
        };
    }

    public static class ShortcutListEntity implements Parcelable {

        private String img;
        private String url;

        public void setImg(String img) {
            this.img = img;
        }

        public void setUrl(String url) {
            this.url = url;
        }

        public String getImg() {
            return img;
        }

        public String getUrl() {
            return url;
        }

        @Override
        public int describeContents() {
            return 0;
        }

        @Override
        public void writeToParcel(Parcel dest, int flags) {
            dest.writeString(this.img);
            dest.writeString(this.url);
        }

        public ShortcutListEntity() {
        }

        protected ShortcutListEntity(Parcel in) {
            this.img = in.readString();
            this.url = in.readString();
        }

        public static final Parcelable.Creator<ShortcutListEntity> CREATOR = new Parcelable.Creator<ShortcutListEntity>() {
            public ShortcutListEntity createFromParcel(Parcel source) {
                return new ShortcutListEntity(source);
            }

            public ShortcutListEntity[] newArray(int size) {
                return new ShortcutListEntity[size];
            }
        };
    }

    public static class ClassListEntity implements Parcelable {

        private String sccode;
        private String scname;
        private String img;

        public void setSccode(String sccode) {
            this.sccode = sccode;
        }

        public void setScname(String scname) {
            this.scname = scname;
        }

        public void setImg(String img) {
            this.img = img;
        }

        public String getSccode() {
            return sccode;
        }

        public String getScname() {
            return scname;
        }

        public String getImg() {
            return img;
        }

        @Override
        public int describeContents() {
            return 0;
        }

        @Override
        public void writeToParcel(Parcel dest, int flags) {
            dest.writeString(this.sccode);
            dest.writeString(this.scname);
            dest.writeString(this.img);
        }

        public ClassListEntity() {
        }

        protected ClassListEntity(Parcel in) {
            this.sccode = in.readString();
            this.scname = in.readString();
            this.img = in.readString();
        }

        public static final Parcelable.Creator<ClassListEntity> CREATOR = new Parcelable.Creator<ClassListEntity>() {
            public ClassListEntity createFromParcel(Parcel source) {
                return new ClassListEntity(source);
            }

            public ClassListEntity[] newArray(int size) {
                return new ClassListEntity[size];
            }
        };
    }


    public static class ShopEntity implements Parcelable {

        private String logo;
        private String operation;
        private String opening;
        private String closing;
        private String distance;
        private String score;
        private String sale_nums;
        private String name;
        private String subname;
        private String contact;
        private String shipping_base;
        private String shipping_price;
        private String shipping_times;
        private String is_star;
        private String address;
        private String promotion;
        private String shopkey;

        public String getShopkey() {
            return shopkey;
        }

        public void setShopkey(String shopkey) {
            this.shopkey = shopkey;
        }

        public String getAddress() {
            return address;
        }

        public void setAddress(String address) {
            this.address = address;
        }

        public void setLogo(String logo) {
            this.logo = logo;
        }

        public void setOperation(String operation) {
            this.operation = operation;
        }

        public void setOpening(String opening) {
            this.opening = opening;
        }

        public void setClosing(String closing) {
            this.closing = closing;
        }

        public void setDistance(String distance) {
            this.distance = distance;
        }

        public void setScore(String score) {
            this.score = score;
        }

        public void setSale_nums(String sale_nums) {
            this.sale_nums = sale_nums;
        }

        public void setName(String name) {
            this.name = name;
        }

        public void setSubname(String subname) {
            this.subname = subname;
        }

        public void setContact(String contact) {
            this.contact = contact;
        }

        public void setShipping_base(String shipping_base) {
            this.shipping_base = shipping_base;
        }

        public void setShipping_price(String shipping_price) {
            this.shipping_price = shipping_price;
        }

        public void setShipping_times(String shipping_times) {
            this.shipping_times = shipping_times;
        }

        public void setIs_star(String is_star) {
            this.is_star = is_star;
        }

        public void setPromotion(String promotion) {
            this.promotion = promotion;
        }

        public String getLogo() {
            return logo;
        }

        public String getOperation() {
            return operation;
        }

        public String getOpening() {
            return opening;
        }

        public String getClosing() {
            return closing;
        }

        public String getDistance() {
            return distance;
        }

        public String getScore() {
            return score;
        }

        public String getSale_nums() {
            return sale_nums;
        }

        public String getName() {
            return name;
        }

        public String getSubname() {
            return subname;
        }

        public String getContact() {
            return contact;
        }

        public String getShipping_base() {
            return shipping_base;
        }

        public String getShipping_price() {
            return shipping_price;
        }

        public String getShipping_times() {
            return shipping_times;
        }

        public String getIs_star() {
            return is_star;
        }

        public String getPromotion() {
            return promotion;
        }

        @Override
        public int describeContents() {
            return 0;
        }

        @Override
        public void writeToParcel(Parcel dest, int flags) {
            dest.writeString(this.logo);
            dest.writeString(this.operation);
            dest.writeString(this.opening);
            dest.writeString(this.closing);
            dest.writeString(this.distance);
            dest.writeString(this.score);
            dest.writeString(this.sale_nums);
            dest.writeString(this.name);
            dest.writeString(this.subname);
            dest.writeString(this.contact);
            dest.writeString(this.shipping_base);
            dest.writeString(this.shipping_price);
            dest.writeString(this.shipping_times);
            dest.writeString(this.is_star);
            dest.writeString(this.address);
            dest.writeString(this.promotion);
            dest.writeString(this.shopkey);
        }

        public ShopEntity() {
        }

        protected ShopEntity(Parcel in) {
            this.logo = in.readString();
            this.operation = in.readString();
            this.opening = in.readString();
            this.closing = in.readString();
            this.distance = in.readString();
            this.score = in.readString();
            this.sale_nums = in.readString();
            this.name = in.readString();
            this.subname = in.readString();
            this.contact = in.readString();
            this.shipping_base = in.readString();
            this.shipping_price = in.readString();
            this.shipping_times = in.readString();
            this.is_star = in.readString();
            this.address = in.readString();
            this.promotion = in.readString();
            this.shopkey = in.readString();
        }

        public static final Parcelable.Creator<ShopEntity> CREATOR = new Parcelable.Creator<ShopEntity>() {
            public ShopEntity createFromParcel(Parcel source) {
                return new ShopEntity(source);
            }

            public ShopEntity[] newArray(int size) {
                return new ShopEntity[size];
            }
        };
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeTypedList(banner_list);
        dest.writeTypedList(shortcut_list);
        dest.writeTypedList(class_list);
        dest.writeTypedList(nearlist);
        dest.writeTypedList(toplist);
        dest.writeTypedList(lastlist);
    }

    public ShopIndex() {
    }

    protected ShopIndex(Parcel in) {
        this.banner_list = in.createTypedArrayList(BannerListEntity.CREATOR);
        this.shortcut_list = in.createTypedArrayList(ShortcutListEntity.CREATOR);
        this.class_list = in.createTypedArrayList(ClassListEntity.CREATOR);
        this.nearlist = in.createTypedArrayList(ShopEntity.CREATOR);
        this.toplist = in.createTypedArrayList(ShopEntity.CREATOR);
        this.lastlist = in.createTypedArrayList(ShopEntity.CREATOR);
    }

    public static final Parcelable.Creator<ShopIndex> CREATOR = new Parcelable.Creator<ShopIndex>() {
        public ShopIndex createFromParcel(Parcel source) {
            return new ShopIndex(source);
        }

        public ShopIndex[] newArray(int size) {
            return new ShopIndex[size];
        }
    };
}
